import 'package:flutter/material.dart';
import 'package:test_flutter/utils/factory/Fit.dart';

class GraButton extends StatelessWidget {


  final VoidCallback onPressed;

  final String title;
  GraButton(this.title,{this.onPressed});

  @override
  Widget build(BuildContext context) {
    return new SizedBox(
      width: Fit.scaleX(880),
      height: Fit.scaleX(180),
      child:  new FlatButton(
        color: Color(0xFF00E8A4),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.only(
            topRight: Radius.circular(Fit.scaleX(90)),
            topLeft: Radius.circular(Fit.scaleX(90)),
            bottomRight: Radius.circular(Fit.scaleX(90)),
            bottomLeft: Radius.circular(Fit.scaleX(90)),
          ),
        ),
        child: new Padding(
          padding: new EdgeInsets.fromLTRB(
              Fit.scaleX(20),
              Fit.scaleX(60),
              Fit.scaleX(20),
              Fit.scaleX(60)),
          child: new Text(
            title,
            style: new TextStyle(
                color: Colors.white,
                fontSize: Fit.scaleTextSize(48)),
          ),
        ),
        onPressed: onPressed,
      ),
    );
  }

}

